[SPARK-28532][SPARK-28530][SQL][FOLLOWUP] Inline doc for FixedPoint(1) batches "Subquery" and "Join Reorder"#25320
Closed
yeshengm wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-28532][SPARK-28530][SQL][FOLLOWUP] Inline doc for FixedPoint(1) batches "Subquery" and "Join Reorder"#25320yeshengm wants to merge 2 commits intoapache:masterfrom
yeshengm wants to merge 2 commits intoapache:masterfrom
Conversation
maropu
reviewed
Jul 31, 2019
| PropagateEmptyRelation) :: | ||
| Batch("Pullup Correlated Expressions", Once, | ||
| PullupCorrelatedPredicates) :: | ||
| // Subquery batch is FixedPoint(1) because optimization might not converge in sub-queries |
Member
There was a problem hiding this comment.
Based on the SPARK-28532 description, how about a statement below?
Subquery batch applies the optimizer rules recursively. Therefore, it makes no sense to enforce idempotence on it and we change this batch from Once to FixedPoint(1).
maropu
reviewed
Jul 31, 2019
| RemoveLiteralFromGroupExpressions, | ||
| RemoveRepetitionFromGroupExpressions) :: Nil ++ | ||
| operatorOptimizationBatch) :+ | ||
| // Join reorder should be FixedPoint(1) since cost can change anyway for AQP. |
Member
There was a problem hiding this comment.
Based on the SPARK-28530 description, how about a statement below;
Since join casts in AQP can change between multiple runs, there is no reason that we have an idempotence enforcement on this batch. We thus make it FixedPoint(1) instead of Once.
|
Test build #108494 has finished for PR 25320 at commit
|
b02e7b6 to
836e0b8
Compare
|
Test build #108527 has finished for PR 25320 at commit
|
836e0b8 to
7e47b70
Compare
maropu
approved these changes
Aug 1, 2019
dilipbiswal
reviewed
Aug 1, 2019
| RemoveLiteralFromGroupExpressions, | ||
| RemoveRepetitionFromGroupExpressions) :: Nil ++ | ||
| operatorOptimizationBatch) :+ | ||
| // Since join casts in AQP can change between multiple runs, there is no reason that we have an |
Contributor
There was a problem hiding this comment.
Nit: typeo .. casts -> cost
|
Test build #108529 has finished for PR 25320 at commit
|
Contributor
|
Just a minor comment , otherwise LGTM |
Member
|
Addressed the comment. Let me merge it now. Thanks! |
|
Test build #108584 has finished for PR 25320 at commit
|
Contributor
|
retest this please |
j-baker
pushed a commit
to palantir/spark
that referenced
this pull request
Jan 25, 2020
…) batches "Subquery" and "Join Reorder" ## What changes were proposed in this pull request? Explained why "Subquery" and "Join Reorder" optimization batches should be `FixedPoint(1)`, which was introduced in SPARK-28532 and SPARK-28530. ## How was this patch tested? Existing UTs. Closes apache#25320 from yeshengm/SPARK-28530-followup. Lead-authored-by: Xiao Li <gatorsmile@gmail.com> Co-authored-by: Yesheng Ma <kimi.ysma@gmail.com> Signed-off-by: gatorsmile <gatorsmile@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Explained why "Subquery" and "Join Reorder" optimization batches should be
FixedPoint(1), which was introduced in SPARK-28532 and SPARK-28530.How was this patch tested?
Existing UTs.